package com.oop.demo02;

import com.oop.demo01.Student;

// 运行主程序
public class application {

    public static void main(String[] args) {


       //new的时候直接调用构造器，因为有参数，直接调用有参构造器
        Person per1 = new Person();
        System.out.println(per1.name);
        System.out.println(per1.age);

        Person per2 = new Person("wwj");
        System.out.println(per2.name);
        System.out.println(per2.age);


        Person per3 = new Person("wwj", 18);
        System.out.println(per3.name);
        System.out.println(per3.age);


    }
}
